package com.wjv.example.springboot.base.config;

import lombok.AllArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>Title: MyConfigAutoConfig</p>
 *
 * @author wjv
 * @since 2021/8/25 9:44
 */
@AllArgsConstructor
@Configuration
@EnableConfigurationProperties(MyConfig.class)
// @ConditionalOnProperty(prefix = MyConfig.PREFIX)
public class MyConfigAutoConfig {

    private MyConfig myConfig;

    @Bean
    public MyConfigManager myConfigManager() {
        return new MyConfigManager(myConfig);
    }
}
